import React from 'react';
import './style.css';

import withPortal from './withPortal';

@withPortal
class Modal extends React.Component {
    render () {
        return (
            <div className='portal'>
                <h1>Portal header</h1>
                <button onClick={() => this.props.onClick()}>add</button>
            </div>
        );
    }

    componentDidMount () {
        console.log(this);
    }
}

export default Modal;
